package com.yien.springstudy.async;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 移动方法
 *
 * @author Miaoxiong Fan
 * @since version
 */
@Component
public class AsyncMethod {

    @Async
    public void printNumber() {
        for (int i = 0; i < 10; i++) {
            System.out.println("num:"+i);
        }
    }
}
